package com.bjx.flow.domain.vo;

import com.bjx.common.core.domain.group.Update;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Range;
import org.springframework.format.annotation.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.Date;

/**
 * @desc: 流程设计VO实体
 * @author: liushuai
 * @date: 2022/10/24
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Schema(title = "FlowDesignVO",description = "流程设计VO实体")
public class FlowDesignVO  {
        /**
        * 设计id
        */
        @NotNull(message = "设计id不能为空",groups = Update.class)
        @Schema(title = "designId",description = "设计id")
        private  String designId;
        /**
        * 设计名称
        */
        @NotNull(message = "设计名称不能为空")
        @Size(max = 64,message = "设计名称长度为1到64个字符")
        @Schema(title = "designName",description = "设计名称")
        private  String designName; 
        /**
        * 组织id
        */
        @NotNull(message = "组织id不能为空")
        @Schema(title = "orgId",description = "组织id")
        private  Long orgId; 
        /**
        * 分组编号
        */
        @NotNull(message = "分组编号不能为空")
        @Size(max = 64,message = "分组编号长度为1到64个字符")
        @Schema(title = "groupCode",description = "分组编号")
        private  String groupCode; 
        /**
        * 设计内容
        */
        @Schema(title = "designContent",description = "设计内容")
        private  String designContent; 
        /**
        * 设计版本
        */
        @Size(max = 64,message = "设计版本长度为1到64个字符")
        @Schema(title = "designVersion",description = "设计版本")
        private  String designVersion; 
        /**
        * 流程定义Id
        */
        @Schema(title = "definitionId",description = "流程定义Id")
        private  String definitionId;
        /**
         * 流程定义Key
         */
        @Schema(title = "definitionKey",description = "流程定义Key")
        private  String definitionKey;
        /**
        * 创建时间
        */
        @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss")
        @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
        @Schema(title = "createDate",description = "创建时间")
        private  Date createDate; 
        /**
        * 创建用户
        */
        @Schema(title = "createUser",description = "创建用户")
        private  Long createUser; 
        /**
        * 修改时间
        */
        @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss")
        @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
        @Schema(title = "updateDate",description = "修改时间")
        private  Date updateDate; 
        /**
        * 修改用户
        */
        @Schema(title = "updateUser",description = "修改用户")
        private  Long updateUser; 
        /**
        * 是否启用(1、是/2、否)
        */
        @NotNull(message = "是否启用不能为空")
        @Range(message = "是否启用超出范围",min = 1,max = 2)
        @Schema(title = "enabled",description = "是否启用(1、是/2、否)")
        private  Short enabled;

        @Schema(title = "创建人名称",description = "创建人名称")
        private String createUserName;

        @Schema(title = "流程分组名称",description = "创建人名称")
        private String groupName;
}